package com.project.common.domain.entity;

import com.project.common.domain.po.BaseAutoKeyPO;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import lombok.Data;

/**
 * @author ysy
 * @blame ysy
 * @date 2022-11-24
 */
@Data
@MappedSuperclass
public class Area extends BaseAutoKeyPO {
    @Schema(description = "上级地区id")
    private Long pid;
    @Schema(description = "地区名")
    @Column(columnDefinition = "varchar(128) DEFAULT NULL")
    private String title;
    @Schema(description = "地区首字母")
    @Column(columnDefinition = "varchar(32) DEFAULT NULL")
    private String letter;
    @Schema(description = "热门城市")
    @Column(columnDefinition = "tinyint(1) DEFAULT 0")
    private Integer hot;
    @Schema(description = "别名")
    @Column(columnDefinition = "varchar(100) DEFAULT NULL")
    private String alias;
    @Schema(description = "地区级别 1 省 2 市 3 区")
    @Column(columnDefinition = "tinyint(1) DEFAULT NULL")
    private Integer level;
    @Schema(description = "状态 1正常 0禁用")
    @Column(columnDefinition = "tinyint(1) DEFAULT 1")
    private Integer status;
    @Schema(description = "区域code")
    private Integer adcode;
    @Schema(description = "排序")
    @Column(columnDefinition = "tinyint(2) DEFAULT 99")
    private Integer sort;
    @Schema(description = "经度")
    private Double lng;
    @Schema(description = "纬度")
    private Double lat;
}
